<?php
/**
 * 加解密服务类（兼容laravel）
 * User: gedongdong
 * Date: 2020-08-25 18:57
 */

namespace app\service;


use app\model\Help;
use support\Encrypter;

class HelpService  extends Base
{

    //列表
    public function list()
    {
        $list = Help::where('status',1)->select()->toArray();

        foreach ($list as &$item) {
            //用#分割为数组
            $item['answer'] = explode('#',$item['answer']);

            //如果
            if($item['video']){
                $item['video'] = 'https://'.env('DOMAIN_NAME').$item['video'];
            }

        }
        return apiSuccess($list);

    }




}